import java.util.Random;

public class BasketballCoach extends Coach implements EnglishSpeakable{
    private int traineeCount;

    public BasketballCoach() {
    }

    public BasketballCoach(String name, int age) {
        super(name, age);
        traineeCount = 0;
    }

    @Override
    public void teach() {
        Random random = new Random();
        // 生成 1 到 5 之间的随机整数，你可以根据需求调整范围
        int randomTraineeCount = random.nextInt(5) + 1;
        traineeCount += randomTraineeCount;
        System.out.println("我正在教篮球学员如何投篮，传球和控制球");
    }
    @Override
    public void introduce() {
        super.introduce();
    }

    @Override
    public void speakEnglish() {
        System.out.println("我会说英语，Let's play table tennis!");
    }

    public void showTraineeStats() {
        System.out.println(getName() + " 已经指导了 " + traineeCount + " 名学员。");
    }
}
